<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo1"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<body>

<div class="layui-card">

    <div class="layui-card-header">
        <span class="layui-icon font-s10 color-desc margin-right-5"></span>陪护公司管理
        <div class="pull-right">
<!--            <button data-table-id="NoticeTable" class="layui-btn layui-btn-primary  layui-btn-sm" data-modal="/system/user/form" data-height="720px" data-width="800px">-->
<!--                <i class=" layui-icon layui-icon-addition"></i>新建护工</button>-->
        </div>
    </div>

    <div class="layui-card-line"></div>

    <div class="layui-card-body">

        <div class="layui-card-table layui-tab">
            <div class="layui-tab-content">
                <form th:replace="/pcs/company/index_search">

                </form>
                <table id="CompanyTable"  data-url='/pcs/company/index' data-target-search="form.form-search"></table>
                <script type="text/javascript" th:inline="none">
                    $(function () {
                        $('#CompanyTable').layTable({
                            even: true, height: 'full',
                            cols: [[
                                {title: '序号', type: 'numbers', width: 80},
                                {field: 'name', title: '公司名称', minWidth: 300, align: 'center'},
                                {field: 'code', title: '信用代码', minWidth: 200, align: 'center'},
                                {field: 'legalName', title: '法人名称', minWidth: 100, align: 'center'},
                                {field: 'legalPhone', title: '法人手机号', minWidth: 100, align: 'center'},
                                {field: 'addr', title: '公司地址', minWidth: 300, align: 'center'},
                                {field: 'porterNum', title: '陪护员人数', minWidth: 100, align: 'center'},
                                {field: 'createTime', title: '创建时间', minWidth: 100, align: 'center'},
                                {toolbar: '#toolbarc', title: '操作', align: 'center', minWidth: 280, fixed: 'right'}
                            ]]
                        });
                    });



                </script>

                <!-- 数据状态切换模板 -->
                <script type="text/html" id="StatusSwitchTplc">
                    <input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="已激活|已禁用" lay-filter="StatusSwitch" {{-d.status>0?'checked':''}}>
<!--                    {{-d.status ? '<b class="color-green">已启用</b>' : '<b class="color-red">已禁用</b>'}}-->
                </script>

                <script type="text/html" id="toolbarc">
                    <a class="layui-btn layui-btn-sm" data-event-dbclick data-title="编辑" shiro:hasPermission="pcs:company:add"   data-modal='/pcs/company/form?id={{d.id}}'>编 辑</a>
                    <a class="layui-btn layui-btn-sm layui-bg-green" data-event-dbclick data-title="账号管理"  shiro:hasPermission="system:user:index"  data-width="1200px" data-modal='/system/user/index?type=2&companyId={{d.id}}'>账号管理</a>
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-event-dbclick data-confirm="确定要删除吗?" shiro:hasPermission="pcs:company:state" data-action='/pcs/company/state?id={{d.id}}&status=3'>删除</a>
                </script>

            </div>
        </div>
    </div>

</div>
</body>
</html>